/*
 *
 *      Copyright (c) 2018-2025, secureplat All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: secureplat
 *
 */

package com.iwomy.secureplat.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 单位管理
 * </p>
 *
 * @author secureplat
 * @since 2018-01-22
 */
@Data
@Schema(description = "单位")
@EqualsAndHashCode(callSuper = true)
public class SysDept extends Model<SysDept> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "dept_id", type = IdType.ASSIGN_ID)
	@Schema(description = "单位id")
	private Long deptId;

	/**
	 * 单位名称
	 */
	@NotBlank(message = "单位名称不能为空")
	@Schema(description = "单位名称")
	private String name;

	/**
	 * 排序
	 */
	@NotNull(message = "排序值不能为空")
	@Schema(description = "排序值")
	private Integer sortOrder;

	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@Schema(description = "修改时间")
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;

	/**
	 * 父级单位id
	 */
	@Schema(description = "父级单位id")
	private Long parentId;

	/**
	 * 是否删除 1：已删除 0：正常
	 */
	@TableLogic
	@Schema(description = "删除标记,1:已删除,0:正常")
	@TableField(fill = FieldFill.INSERT)
	private String delFlag;

	/**
	 * 特别关注,0：否,1：是
	 */
	@Schema(description = "特别关注,0：否,1：是")
	private String specialAttention;

	/**
	 * 租户id
	 */
	@Schema(description = "租户id")
	private Long tenantId;

	/**
	 * 联系人
	 */
	@Schema(description = "联系人")
	private String contacts;

	/**
	 * 联系电话
	 */
	@Schema(description = "联系电话")
	private String workTelephone;

	/**
	 * 设备数量
	 */
	@Schema(description = "设备数量")
	private Integer deviceCount;

	/**
	 * 安装设备数
	 */
	@Schema(description = "安装设备数")
	private Integer installedNum;

	/**
	 * 下级数量
	 */
	@Schema(description = "下级数量")
	private Integer childrenNum;

	/**
	 * 单位属性
	 */
	@Schema(description="单位属性")
	private String deptType;

	/**
	 * 业务员
	 */
	@Schema(description="业务员")
	private String salesman;

	/**
	 * 备注
	 */
	@Schema(description="备注")
	private String remark;

	/**
	 * 选择接入的平台
	 */
	@Schema(description="选择接入的平台")
	private String platform;

	/**
	 * 消防监管等级
	 */
	@Schema(description="消防监管等级")
	private String monitorLevel;

	/**
	 * 行政主管部门
	 */
	@Schema(description="行政主管部门")
	private String industryDept;

	/**
	 * 所属行业
	 */
	@Schema(description="所属行业")
	private String industryType;

	/**
	 * 单位地址
	 */
	@Schema(description="单位地址")
	private String address;

	/**
	 * 统一社会信用代码
	 */
	@Schema(description="统一社会信用代码")
	private String creditCode;

	/**
	 * 法人代表
	 */
	@Schema(description="法人代表")
	private String corporator;

	/**
	 * 法人代表身份证
	 */
	@Schema(description="法人代表身份证")
	private Long corporatorId;

	/**
	 * 法人代表电话
	 */
	@Schema(description="法人代表电话")
	private String corporatorTel;

	/**
	 * 监管类别ID
	 */
	@Schema(description="监管类别ID")
	private Long monitorTypeId;

	/**
	 * 消防主管部门
	 */
	@Schema(description="消防主管部门")
	private String fireManage;

	/**
	 * 所属监管中心
	 */
	@Schema(description="所属监管中心")
	private String monitorCenter;

	/**
	 * 包含系统
	 */
	@Schema(description="包含系统")
	private String includeSystem;

	/**
	 * 所在区域
	 */
	@Schema(description="所在区域")
	private String areaName;

	/**
	 * 区域所在位置
	 */
	@Schema(description="区域所在位置")
	private String areaLocation;

	/**
	 * 消防安全责任人
	 */
	@Schema(description="消防安全责任人")
	private String fireSafePerson;

	/**
	 * 消防安全责任人身份证号
	 */
	@Schema(description="消防安全责任人身份证号")
	private Long fireSafePersonId;

	/**
	 * 消防安全责任人电话
	 */
	@Schema(description="消防安全责任人电话")
	private String fireSafePersonTel;

	/**
	 * 消防安全管理人
	 */
	@Schema(description="消防安全管理人")
	private String fireSafeManager;

	/**
	 * 消防安全管理人身份证号
	 */
	@Schema(description="消防安全管理人身份证号")
	private Long fireSafeManagerId;

	/**
	 * 消防安全管理人电话
	 */
	@Schema(description="消防安全管理人电话")
	private String fireSafeManagerTel;

	/**
	 * 专兼职消防管理人
	 */
	@Schema(description="专兼职消防管理人")
	private String fptimeFireManager;

	/**
	 * 专兼职消防管理人身份证号
	 */
	@Schema(description="专兼职消防管理人身份证号")
	private Long fptimeFireManagerId;

	/**
	 * 专兼职消防管理人电话
	 */
	@Schema(description="专兼职消防管理人电话")
	private String fptimeFireManagerTel;

	/**
	 * 监督值守单位类型
	 */
	@Schema(description="监督值守单位类型")
	private String superviseDutyType;

	/**
	 * 营业执照
	 */
	@Schema(description="营业执照")
	private String businessLicense;

	/**
	 * 合同
	 */
	@Schema(description="合同")
	private String contract;

}
